       window.onload = function() {
           //事件的捕获和冒泡
           let div_child = document.getElementById("div_child")
           let div_parent = document.getElementById("div_parent")
           div_child.addEventListener("click", (event) => {
               event.stopPropagation() //阻止传播
               console.log("div_child被点击")
           })
           div_parent.addEventListener("click", () => {
                   console.log("div_parent被点击")
               }, true) //捕获
               // document.querySelectorAll("ul li")[1].addEventListener("click",(event)=>{
               //     console.log(event.target.innerHtml)
               // })
               // document.querySelectorAll("ul")[0].addEventListener("click", (event) => {
               //     console.log(event.target.innerHTML)
               // })
           document.getElementsByTagName("div")[2].addEventListener("click", (event) => {
               console.log(event.target.innerHTML)
                   // event.target.remove() //点击的项被删去
           })
           document.getElementsByTagName("a")[0].addEventListener("click", (event) => {
                   event.preventDefault() //阻止默认行为
               })
               //window--->document--->html--->body--->div/ul/form
           console.log(document.documentElement)
           console.log(document.body)
           window.alert("123456")
           alert("789123")
       }